<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
	<title></title>
</head>
<body>
	<!-- include the performance framework first, so it can initialize and inject its UI -->
	<script src="perfFramework.js"></script>
	
	<script>
		function runTest(version, qs) {
			var ns = checkVersion("0.5") ? createjs : window;
			
			var canvas = document.getElementById("testCanvas");
			var w=canvas.width, h=canvas.height;
			var stage = new ns.Stage("testCanvas");
			stage.tickOnUpdate = false;
			
			
			time("total");
			time("instantiate");
			var arr = [], l=100000;
			for (var i=0; i<l; i++) {
				arr.push(new ns.Matrix2D());
			}
			endTime("instantiate", true);
			
			time("calculate");
			var sum = 0;
			for (var i=0; i<l; i++) {
				var mtx = arr[i];
				mtx.appendTransform(Math.random()*500, Math.random()*500, Math.random(), Math.random(), Math.random()*360);
			}
			endTime("calculate", true);
			
			
			endTime("total", true);
			endTest();
		}
	</script>
	
	<p>Tests performance of creating, populating, and appending a transform to 100k Matrix2D instances.</p>
	<canvas id="testCanvas" width="900" height="450"></canvas>
</body>
</html>